/**
 * 
 */
package com.easidea.tim.entity.commodity;

import javax.persistence.Column;
import javax.persistence.Entity;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import org.springside.core.dao.extend.Undeletable;

import com.easidea.tim.entity.BaseEntity;

/**
 * @author Harrison
 *
 */
@Entity(name="tim_commodity_product")
@org.hibernate.annotations.Entity(dynamicInsert=true,dynamicUpdate=true)
@Undeletable(status = "deleted")
@Cache(region="tim_commodity_product",usage=CacheConcurrencyStrategy.READ_WRITE)
public class Product extends BaseEntity {

	/**
	 * 
	 */
	private static final long serialVersionUID = -3639179435043934401L;
	
	private String name; // 品名
	private Float basicPrice; // 基准价格
	private String internalCode; // 内部编码（有可能是条码）
	private String colorCode; // 色号
	private String standardCode; // 预留，暂无用处
	private Boolean dummyFlag; // 为挂板功能使用，系统会给每个布品增加对应一个色号为R的产品信息
	
	
	/**
	 * @return the name
	 */
	@Column(name="name", length=25, nullable=false)
	public String getName() {
		return name;
	}
	/**
	 * @param name the name to set
	 */
	public void setName(String name) {
		this.name = name;
	}
	/**
	 * @return the basicPrice
	 */
	@Column(name="basic_price",length=8,precision=2,nullable=true)
	public Float getBasicPrice() {
		return basicPrice;
	}
	/**
	 * @param basicPrice the basicPrice to set
	 */
	public void setBasicPrice(Float basicPrice) {
		this.basicPrice = basicPrice;
	}
	/**
	 * @return the internalCode
	 */
	@Column(name="internal_code",length=50, nullable=true)
	public String getInternalCode() {
		return internalCode;
	}
	/**
	 * @param internalCode the internalCode to set
	 */
	public void setInternalCode(String internalCode) {
		this.internalCode = internalCode;
	}
	/**
	 * @return the colorCode
	 */
	@Column(name="color_code",length=25,nullable=false)
	public String getColorCode() {
		return colorCode;
	}
	/**
	 * @param colorCode the colorCode to set
	 */
	public void setColorCode(String colorCode) {
		this.colorCode = colorCode;
	}
	/**
	 * @return the standardCode
	 */
	@Column(name="standard_code",length=25,nullable=true)
	public String getStandardCode() {
		return standardCode;
	}
	/**
	 * @param standardCode the standardCode to set
	 */
	public void setStandardCode(String standardCode) {
		this.standardCode = standardCode;
	}
	/**
	 * @return the dummyFlag
	 */
	@Column(name="dummy_flag",columnDefinition="bool default false")
	public Boolean getDummyFlag() {
		return dummyFlag;
	}
	/**
	 * @param dummyFlag the dummyFlag to set
	 */
	public void setDummyFlag(Boolean dummyFlag) {
		this.dummyFlag = dummyFlag;
	}
	
	
}
